<script>
    jQuery(function($) {
        document.getElementById('a').onclick = function () {
            var str="How are you doing today?";
            alert(str.split(" "));
            alert(str.split(""));
            alert(str.split(" ",3))
        }
    });
</script>
<div class="bord">
    <div class="title">split</div>
    <div class="introduce">
        split() 方法用于把一个字符串分割成字符串数组。
    </div>
</div>
<div class="bord">
    <div class="title">演示效果</div>
    <pre>
       文字：How are you doing today?<br/>
        1.以空格分割
        2.以一个字母分割
        3.以空格分割，但是只去前三个字符串
            </pre>
    <button class="introduce" id="a">打印结果</button>
</div>
<div class="bord">
    <div class="title">代码</div>
    <div class="introduce">
        <pre>
                &lt;script&gt;
        jQuery(function($) {
            document.getElementById('a').onclick = function () {
                var str="How are you doing today?";
                alert(str.split(" "));
                alert(str.split(""));
                alert(str.split(" ",3))
            }
        });
                &lt;/script&gt;
        </pre>
    </div>
</div>